#!/usr/bin/python
# -*- coding: utf-8 -*-



import os
import sys
from PyQt4 import QtCore, QtGui
from Main import *


class Page9(object):
    def __init__(self,session):
		self.session=session
		self.app = QtGui.QApplication(sys.argv)
		self.window=QtGui.QDialog()
                self.retour=0
                self.parametre={}
                self.config={}



    def processing(self):

       self.window.close()
       obj10=Main()
       obj10.func10(self.parametre)
       
       
     

    def affich(self,param):
      
	self.setupUi(self.window)
	self.window.show()
        sys.exit(self.app.exec_())

    def precedent(self):
        self.window.close()
        os.system("./Main.py 8")
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(1270, 721)
        self.lineEdit_site_termine = QtGui.QLineEdit(Dialog)
        self.lineEdit_site_termine.setGeometry(QtCore.QRect(320, 20, 621, 66))
        font = QtGui.QFont()
        font.setFamily("Bitstream Charter")
        font.setPointSize(32)
        font.setWeight(50)
        font.setBold(False)
        self.lineEdit_site_termine.setFont(font)
        self.lineEdit_site_termine.setAlignment(QtCore.Qt.AlignCenter)
        self.lineEdit_site_termine.setReadOnly(True)
        self.lineEdit_site_termine.setObjectName("lineEdit_site_termine")
        self.lineEdit_resultats_campagnes = QtGui.QLineEdit(Dialog)
        self.lineEdit_resultats_campagnes.setGeometry(QtCore.QRect(20, 170, 351, 41))
        font = QtGui.QFont()
        font.setFamily("Bitstream Charter")
        font.setPointSize(14)
        self.lineEdit_resultats_campagnes.setFont(font)
        self.lineEdit_resultats_campagnes.setAlignment(QtCore.Qt.AlignCenter)
        self.lineEdit_resultats_campagnes.setReadOnly(True)
        self.lineEdit_resultats_campagnes.setObjectName("lineEdit_resultats_campagnes")
        self.pushButton_suivant = QtGui.QPushButton(Dialog)
        self.pushButton_suivant.setGeometry(QtCore.QRect(1080, 650, 171, 41))
        font = QtGui.QFont()
        font.setFamily("Bitstream Charter")
        font.setPointSize(12)
        self.pushButton_suivant.setFont(font)
        self.pushButton_suivant.setObjectName("pushButton_suivant")
        self.pushButton_annuler = QtGui.QPushButton(Dialog)
        self.pushButton_annuler.setGeometry(QtCore.QRect(740, 650, 171, 41))
        font = QtGui.QFont()
        font.setFamily("Bitstream Charter")
        font.setPointSize(12)
        self.pushButton_annuler.setFont(font)
        self.pushButton_annuler.setObjectName("pushButton_annuler")
        self.pushButton_precedent = QtGui.QPushButton(Dialog)
        self.pushButton_precedent.setGeometry(QtCore.QRect(910, 650, 171, 41))
        font = QtGui.QFont()
        font.setFamily("Bitstream Charter")
        font.setPointSize(12)
        self.pushButton_precedent.setFont(font)
        self.pushButton_precedent.setObjectName("pushButton_precedent")
        self.lineEdit_nombre_campagnes = QtGui.QLineEdit(Dialog)
        self.lineEdit_nombre_campagnes.setGeometry(QtCore.QRect(20, 120, 321, 41))
        font = QtGui.QFont()
        font.setFamily("Bitstream Charter")
        font.setPointSize(14)
        self.lineEdit_nombre_campagnes.setFont(font)
        self.lineEdit_nombre_campagnes.setAlignment(QtCore.Qt.AlignCenter)
        self.lineEdit_nombre_campagnes.setReadOnly(True)
        self.lineEdit_nombre_campagnes.setObjectName("lineEdit_nombre_campagnes")
        self.lineEdit_nombre_campagne_vide = QtGui.QLineEdit(Dialog)
        self.lineEdit_nombre_campagne_vide.setGeometry(QtCore.QRect(340, 120, 61, 41))
        font = QtGui.QFont()
        font.setFamily("Bitstream Charter")
        font.setPointSize(14)
        self.lineEdit_nombre_campagne_vide.setFont(font)
        self.lineEdit_nombre_campagne_vide.setObjectName("lineEdit_nombre_campagne_vide")
        self.textEdit_resultats_campagnes_vide = QtGui.QTextEdit(Dialog)
        self.textEdit_resultats_campagnes_vide.setGeometry(QtCore.QRect(20, 210, 1191, 421))
        font = QtGui.QFont()
        font.setFamily("Bitstream Charter")
        font.setPointSize(12)
        self.textEdit_resultats_campagnes_vide.setFont(font)
        self.textEdit_resultats_campagnes_vide.setObjectName("textEdit_resultats_campagnes_vide")

        self.retranslateUi(Dialog)
        QtCore.QObject.connect(self.pushButton_annuler, QtCore.SIGNAL("clicked()"), Dialog.accept)

        QtCore.QObject.connect(self.pushButton_precedent, QtCore.SIGNAL("clicked()"),self.precedent)
        QtCore.QObject.connect(self.pushButton_suivant, QtCore.SIGNAL("clicked()"), self.processing)
        QtCore.QMetaObject.connectSlotsByName(Dialog)

    def retranslateUi(self, Dialog):
        Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "Dialog", None, QtGui.QApplication.UnicodeUTF8))
        self.lineEdit_site_termine.setText(QtGui.QApplication.translate("Dialog", "BATIMENT TERMINE", None, QtGui.QApplication.UnicodeUTF8))
        self.lineEdit_resultats_campagnes.setText(QtGui.QApplication.translate("Dialog", "Résultats des campagnes :", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_suivant.setText(QtGui.QApplication.translate("Dialog", "Suivant >>", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_annuler.setText(QtGui.QApplication.translate("Dialog", "Annuler", None, QtGui.QApplication.UnicodeUTF8))
        self.pushButton_precedent.setText(QtGui.QApplication.translate("Dialog", "<< Précédent", None, QtGui.QApplication.UnicodeUTF8))
        self.lineEdit_nombre_campagnes.setText(QtGui.QApplication.translate("Dialog", "Nombre de campagnes :", None, QtGui.QApplication.UnicodeUTF8))

